import request from '@/utils/request';

/**
 * 登录接口
 * @param {*} data
 * @returns
 */
export const loginAPI = ({ username, password }) => {
  return request({
    url: '/personnelManagement/employees/login',
    method: 'POST',
    data: {
      username,
      password,
    },
  });
  // .then((res) => {
  //   return res;
  // })
  // .catch((err) => {
  //   return err;
  // });
};

/**
 * 退出登录
 * @param {*}
 * @returns
 */
export const loginOut = () => {
  return request({
    url: '/personnelManagement/employees/logout',
    method: 'POST',
  });
};
